home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1994 March
/
Internet Info CD-ROM (Walnut Creek) (March 1994).iso
/
networking
/
ip
/
ka9q
/
alpha.arc
/
ECVECAT.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-04-16
|
3KB
|
161 lines
; alternative to ecvec.asm -- WORKS ON PC/ATs (80826) only!
mod186
include lmacros.h
; Conditional ES save/restore macros not in lmacros.h
pushes macro
ifdef LONGPTR
push es
endif
endm
popes macro
ifdef LONGPTR
pop es
endif
endm
assume ds:dataseg
assume cs:codeseg
public sssave,spsave,intstk
ifdef FARPROC
extrn doret:far,ecint_:far,getintds:far
else
extrn doret:near,ecint_:near,getintds:near
endif
; ec0vec - Ethernet interrupt handler
public ec0vec_
ec0vec_ proc far
push ds ; save on user stack
call getintds ; establish interrupt data segment
mov ds:sssave,ss ; stash user stack context
mov ds:spsave,sp
push ds
pop ss
lea sp,intstk+512
push ax ; save user regs on interrupt stack
push bx
push cx
push dx
push bp
push si
push di
push es
push ds
pop es
mov ax,0 ; arg for service routine
push ax
call ecint_
pop ax
jmp doret
ec0vec_ endp
; ec1vec - Ethernet interrupt handler
public ec1vec_
ec1vec_ proc far
push ds ; save on user stack
call getintds ; establish interrupt data segment
mov ds:sssave,ss ; stash user stack context
mov ds:spsave,sp
push ds
pop ss
lea sp,intstk+512
push ax ; save user regs on interrupt stack
push bx
push cx
push dx
push bp
push si
push di
push es
push ds
pop es
mov ax,1 ; arg for service routine
push ax
call ecint_
pop ax
jmp doret
ec1vec_ endp
; ec2vec - Ethernet interrupt handler
public ec2vec_
ec2vec_ proc far
push ds ; save on user stack
call getintds ; establish interrupt data segment
mov ds:sssave,ss ; stash user stack context
mov ds:spsave,sp
push ds
pop ss
lea sp,intstk+512
push ax ; save user regs on interrupt stack
push bx
push cx
push dx
push bp
push si
push di
push es
push ds
pop es
mov ax,2 ; arg for service routine
push ax
call ecint_
pop ax
jmp doret
ec2vec_ endp
; fast buffer I/O routines -- used by 3-COM Ethernet controller
; outbuf - put a buffer to an output port
procdef outbuf,<<oport,word>,<obuf,ptr>,<ocnt,word>>
pushf
push si
pushds
mov dx,oport
mov cx,ocnt
ldptr si,obuf,ds ; ds:si = obuf
cld
rep outsb ; works only on PC/AT (80286)
popds
pop si
popf
pret
pend outbuf
; inbuf - get a buffer from an input port
procdef inbuf,<<iport,word>,<ibuf,ptr>,<icnt,word>>
pushf
push di
pushes
mov dx,iport
mov cx,icnt
ldptr di,ibuf,es ; es:di = ibuf (es already set in small model)
cld
rep insb ; works only on PC/AT (80286)
popes
pop di
popf
pret
pend inbuf
end